package cn.ztuo.bitrade.service;

import cn.ztuo.bitrade.dao.ContractBondMapper;
import cn.ztuo.bitrade.entity.ContractBond;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class ContractBondService {

    @Autowired
    private ContractBondMapper contractBondMapper;

    public List<ContractBond> findByContractBond(String symbol, BigDecimal getlocationvalue) {
        return contractBondMapper.findByContractBond(symbol,getlocationvalue);
    }

    public List<ContractBond> findBySymbol(String symbol, Sort sort) {
        return contractBondMapper.findBySymbol(symbol,sort);
    }

    public ContractBond findBySymbolAndMultiple(String symbol, BigDecimal lever) {
        return contractBondMapper.findBySymbolAndMultiple(symbol,lever);
    }

    public ContractBond findById(Long id) {
        return contractBondMapper.findById(id);
    }
    public ContractBond saveAndFlush(ContractBond bond) {
        return contractBondMapper.saveAndFlush(bond);
    }
}
